/**
 * 
 */
package com.gite.nouette.admin.implementation.application.init;

import com.gite.nouette.admin.contract.application.init.IInitializerAdmin;
import com.gite.nouette.admin.contract.integrator.assembler.IAssemblerAdmin;
import com.gite.nouette.admin.contract.integrator.factory.IFactoryController;
import com.gite.nouette.admin.contract.model.IAdmin;
import com.gite.nouette.admin.implementation.integrator.assembler.AssemblerAdminImpl;

/**
 * @author Cyril Souti
 * 
 */
public class InitializerAdminImpl implements IInitializerAdmin {
	private IFactoryController factoryController = null;
	private IAdmin admin = null;

	public InitializerAdminImpl() {
	}

	/**
	 * @return the factoryController
	 */
	@Override
	public IFactoryController getFactoryController() {
		return this.factoryController;
	}

	/**
	 * @param factoryController
	 *            the factoryController to set
	 */
	@Override
	public void setFactoryController(IFactoryController factoryController) {
		this.factoryController = factoryController;
	}

	/**
	 * @return the admin
	 */
	@Override
	public IAdmin getAdmin() {
		return this.admin;
	}

	/**
	 * @param admin
	 *            the admin to set
	 */
	@Override
	public void setAdmin(IAdmin admin) {
		this.admin = admin;
	}

	@Override
	public void init() {
		IAssemblerAdmin assemblerAdmin = new AssemblerAdminImpl(
				getFactoryController());
		assemblerAdmin.setParentProduct(this);
		assemblerAdmin.run();
	}

}
